{% extends "personal_center.html" %}
{% block main_content %}
    <table class="table">
        <thead>
            <tr>
                <th>用户名</th>
                <th>邮箱</th>
                <th>博客数量</th>
                <th>状态</th>
                <th>最近登录时间</th>
                <th>创建时间</th>
                <th>操作</th>
            </tr>
        </thead>
        <tbody>
            {% for item in list %}
                <tr>
                    <td>{{item.username}}</td>
                    <td>{{item.email}}</td>
                    <td>{{item.article_count}}</td>
                    <td>{{item.status | format_user_status}}</td>
                    <td>{{item.last_logined_time}}</td>
                    <td>{{item.created_time}}</td>
                    <td>
                        {% if item.status %}
                            <a href="{{url_for('user.upgradeStatus', id=item.id)}}" class="btn btn-danger btn-sm">停用</a>
                        {% else %}
                            <a href="{{url_for('user.upgradeStatus', id=item.id)}}" class="btn btn-success btn-sm">启用</a>
                        {% endif %}

                    </td>
                </tr>
            {% endfor %}
        </tbody>
    </table>
{% endblock %}